Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

d3plus-geomap

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d3plus-geomap

A reusable geo map built on D3 and Topojson

  • 0.2.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
593
decreased by-25.87%
Maintainers
1
Weekly downloads
 
Created
Source

d3plus-geomap

NPM Release Build Status Dependency Status Slack

A reusable geo map built on D3 and Topojson

Installing

If you use NPM, npm install d3plus-geomap. Otherwise, download the latest release. The released bundle supports AMD, CommonJS, and vanilla environments. Create a custom bundle using Rollup or your preferred bundler. You can also load directly from d3plus.org:

<script src="https://d3plus.org/js/d3plus-geomap.v0.2.full.min.js"></script>

API Reference

Geomap ⇐ Viz

Kind: global class
Extends: Viz

new Geomap()

Creates SVG paths and coordinate points based on an array of data. See this example for help getting started using the geomap generator.

Geomap.bounds([value])

If value is specified, filters the features used to calculate the initial projection fitExtent based on an ID, array of IDs, or filter function and returns the current class instance. If value is not specified, returns the current bounds filter.

Kind: static method of Geomap

ParamType
[value]Number | String | Array | function

Geomap.ocean([value])

If value is specified, sets the ocean color and returns the current class instance. If value is not specified, returns the current ocean color.

Kind: static method of Geomap

ParamTypeDefault
[value]String"#cdd1d3"

Geomap.padding([value])

If value is specified, sets the topojson outer padding and returns the current class instance. If value is not specified, returns the current topojson outer padding.

Kind: static method of Geomap

ParamTypeDefault
[value]Number20

Geomap.point([value])

If value is specified, sets the point accessor to the specified function or array and returns the current class instance. Point values are expected in the format [longitude, latitude], which is in-line with d3's expected [x, y] mapping. If value is not specified, returns the current point accessor.

Kind: static method of Geomap

ParamType
[value]function | Array

Geomap.pointSize([value])

If value is specified, sets the point size accessor to the specified function or number and returns the current class instance. If value is not specified, returns the current point size accessor.

Kind: static method of Geomap

ParamType
[value]function | Number

Geomap.pointSizeMax([value])

If value is specified, sets the maximum point radius and returns the current class instance. If value is not specified, returns the current maximum point radius.

Kind: static method of Geomap

ParamTypeDefault
[value]Number10

Geomap.pointSizeMin([value])

If value is specified, sets the minimum point radius and returns the current class instance. If value is not specified, returns the current minimum point radius.

Kind: static method of Geomap

ParamTypeDefault
[value]Number5

Geomap.tiles([value])

If value is specified, toggles the map tiles and returns the current class instance. If value is not specified, returns the current tiling boolean.

Kind: static method of Geomap

ParamTypeDefault
[value]Booleantrue

Geomap.topojson([value])

If value is specified, sets the topojson to be used and returns the current class instance. If value is not specified, returns the current topojson.

Kind: static method of Geomap

ParamType
[value]Boolean | Object

Geomap.topojsonFilter([value])

If value is specified, filters the features used to calculate the initial projection fitExtent based on an ID, array of IDs, or filter function and returns the current class instance. If value is not specified, returns the current bounds filter.

Kind: static method of Geomap

ParamType
[value]Number | String | Array | function

Geomap.topojsonKey([value])

If value is specified, sets the topojson object key to be used and returns the current class instance. If value is not specified, returns the current topojson object key.

Kind: static method of Geomap

ParamTypeDefault
[value]String"countries"

Geomap.zoom([value])

If value is specified, toggles the zoom behavior and returns the current class instance. If value is not specified, returns the current zoom behavior.

Kind: static method of Geomap

ParamTypeDefault
[value]Booleantrue
Documentation generated on Tue, 20 Dec 2016 20:27:32 GMT

Keywords

FAQs

Package last updated on 20 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc